package cs422.group1.projectsquirrel;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ContactUs extends Activity { 
	
	//Create references to views on current screen.
	private Button emailButton;	
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.contactus);
        
        //Setting up the references to all of the elements on the current screen.
        emailButton = (Button)findViewById(R.id.button1);
                
        //Attaching a listener for callback on the send email button.
        emailButton.setOnClickListener(new nextQuestionListener());
  
	}
	
	
	//Callback function for the NEXT button.
	public class nextQuestionListener implements OnClickListener
	{
		public void onClick(View view)
		{
			Intent intent = new Intent(android.content.Intent.ACTION_SEND);
			String to[] = new String[] { "sciurus@uic.edu" , ""};
			intent.putExtra(android.content.Intent.EXTRA_EMAIL, to);
			startActivity(Intent.createChooser(intent, "Send mail..."));
		}
	}	
	
}
